package com.huawei.appgallery.search.ui.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout.LayoutParams;
import com.huawei.appgallery.search.ui.card.BaseCompositeCard;
import java.util.ArrayList;
import java.util.List;
import o.azb;
import o.cgz;
import o.cht;
import o.cih;
import o.cuv.b;
import o.cuv.e;
import o.dyf;
import o.dyk;

public class BaseCompositeNode extends cht {
    public BaseCompositeNode(Context context) {
        super(context, 1);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        View ˎ = ˎ();
        azb.ˏ(ˎ, b.ˋʻ);
        ॱ(ˎ);
        cih ˋ = ˋ();
        viewGroup.addView(ˎ, new LayoutParams(-1, -2));
        ˋ.ˏ(ˎ);
        ˊ(ˋ);
        return true;
    }

    public BaseCompositeCard ˋ() {
        return new BaseCompositeCard(this.ॱ);
    }

    public boolean ॱ() {
        return true;
    }

    public boolean ʽ() {
        return true;
    }

    public ArrayList<String> z_() {
        ArrayList<String> arrayList = new ArrayList();
        for (int i = 0; i < ˊॱ(); i++) {
            BaseCompositeCard baseCompositeCard = (BaseCompositeCard) ˊ(i);
            if (baseCompositeCard != null) {
                List ˊ = baseCompositeCard.ˊ();
                int size = ˊ.size();
                for (int i2 = 0; i2 < size; i2++) {
                    cgz o_cgz = (cgz) ˊ.get(i2);
                    if (o_cgz != null) {
                        View ˉ = o_cgz.ˉ();
                        if (ˉ != null && new dyf().ˎ(ˉ)) {
                            String ˏ = dyk.ˏ(o_cgz);
                            if (ˏ != null) {
                                arrayList.add(ˏ);
                            }
                        }
                    }
                }
            }
        }
        return arrayList;
    }

    protected View ˎ() {
        return LayoutInflater.from(this.ॱ).inflate(e.ॱᐝ, null);
    }

    protected void ॱ(View view) {
    }
}
